import 'package:backend.core/core/domain/entities/api/api_money_amount.dart';
import 'package:backend.core/core/domain/entities/api/web/api_web_purchased_subscription_transaction.dart';
import 'package:backend.core/core/domain/entities/api/web/api_web_purchased_subscription_transaction_offer_type.dart';
import 'package:backend.core/core/domain/entities/api/web/yookassa/api_yookassa_transaction.dart';
import 'package:backend.core/core/domain/entities/api/web/yookassa/api_yookassa_transaction_revocation_info.dart';

class ApiYookassaPurchasedSubscriptionTransaction extends ApiYookassaTransaction
    implements ApiWebPurchasedSubscriptionTransaction {
  const ApiYookassaPurchasedSubscriptionTransaction({
    required this.id,
    required this.time,
    required this.amount,
    required this.offerType,
    required this.revocationInfo,
    required this.incomeAmount,
    required this.expirationTime,
    required this.originalTransactionId,
  });

  @override
  final String id;

  @override
  final DateTime time;

  @override
  final ApiMoneyAmount amount;

  @override
  final ApiWebPurchasedSubscriptionTransactionOfferType offerType;

  @override
  final ApiYookassaTransactionRevocationInfo? revocationInfo;

  @override
  final ApiMoneyAmount incomeAmount;

  @override
  final DateTime expirationTime;

  @override
  final String originalTransactionId;

  @override
  List<Object?> get props {
    return [
      id,
      time,
      amount,
      offerType,
      revocationInfo,
      incomeAmount,
      expirationTime,
      originalTransactionId,
    ];
  }
}
